package com.chat.common.websocket.service;

import com.chat.common.user.domain.ws.WSAuthorize;
import com.chat.common.websocket.domain.enums.WSBaseResp;
import io.netty.channel.Channel;
import io.netty.channel.ChannelHandlerContext;

public interface WebSocketService  {
    void connect(Channel channel);

    void handleLoginReq(Channel channel);

    void offLine(Channel ctx);

    Boolean scanLoginSuccess(Integer code, Long id);

    void waitAuthorize(Integer code);

    void authorize(Channel channel, WSAuthorize wsAuthorize);

    void sendMsgAll(WSBaseResp<?> wsBaseResp);

    void sendToUid(WSBaseResp<?> wsBaseMsg, Long uid);

    void sendToAllOnline(WSBaseResp<?> wsBaseMsg, Long skipUid);

    Boolean scanSuccess(Integer code);

    void removed(Channel channel);
}
